#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int count_one_of_bit(int m)
{
	int count = 0;
	while (m)
	{
		if (m % 2 == 1)
			count++;

		m = m / 2;
	}
	return count;
}

int main()
{
	int n = 0;
	scanf("%d", &n);
	int ret = count_one_of_bit(n);
	printf("%d\n", ret);

	return 0;
}